using System;
using ContactPrinter.Model.Interfaces;
using Google.GData.Extensions;

namespace ContactPrinter.Model
{
    public class GooglePostalAddress : IPostalAddress
    {
        private readonly StructuredPostalAddress postalAddress;

        public GooglePostalAddress(StructuredPostalAddress postalAddress)
        {
            this.postalAddress = postalAddress;
        }

        #region Implementation of IPostalAddress

        public bool Primary
        {
            get { return postalAddress.Primary; }
            set { postalAddress.Primary = value; }
        }

        public string Label
        {
            get { return postalAddress.Label; }
            set { postalAddress.Label = value; }
        }

        public string Usage
        {
            get { return postalAddress.Usage; }
            set { postalAddress.Usage = value; }
        }

        public string MailClass
        {
            get { return postalAddress.MailClass; }
            set { postalAddress.MailClass = value; }
        }

        public string Agent
        {
            get { return postalAddress.Agent; }
            set { postalAddress.Agent = value; }
        }

        public string Housename
        {
            get { return postalAddress.Housename; }
            set { postalAddress.Housename = value; }
        }

        public string Street
        {
            get { return postalAddress.Street; }
            set { postalAddress.Street = value; }
        }

        public string Pobox
        {
            get { return postalAddress.Pobox; }
            set { postalAddress.Pobox = value; }
        }

        public string Neighborhood
        {
            get { return postalAddress.Neighborhood; }
            set { postalAddress.Neighborhood = value; }
        }

        public string City
        {
            get { return postalAddress.City; }
            set { postalAddress.City = value; }
        }

        public string Subregion
        {
            get { return postalAddress.Subregion; }
            set { postalAddress.Subregion = value; }
        }

        public string Region
        {
            get { return postalAddress.Region; }
            set { postalAddress.Region = value; }
        }

        public string Postcode
        {
            get { return postalAddress.Postcode; }
            set { postalAddress.Postcode = value; }
        }

        public string Country
        {
            get { return postalAddress.Country; }
            set { postalAddress.Country = value; }
        }

        public string FormattedAddress
        {
            get { return postalAddress.FormattedAddress; }
            set { postalAddress.FormattedAddress = value; }
        }

        #endregion

        public override string ToString()
        {
            return FormattedAddress;
        }
    }
}